<!--
 * @Author         : yanyongyu
 * @Date           : 2022-09-26 15:01:05
 * @LastEditors    : yanyongyu
 * @LastEditTime   : 2022-10-06 03:57:35
 * @Description    : None
 * @GitHub         : https://github.com/yanyongyu
-->

{% from "icons/x.html.jinja" import octicon_x %}

{% macro review_dismissed(event, ns) %}
<div class="TimelineItem">
  <div class="TimelineItem-badge">
    {{ octicon_x() }}
  </div>
  <div class="TimelineItem-body">
    <a class="d-inline-block">
      <img class="avatar avatar-user" height="20" width="20" src="{{ event.actor.avatar_url }}" />
    </a>
    <a class="author Link--primary text-bold">
      {{ event.actor.login|escape }}
    </a>
    {% set dismissed_review = find_dismissed_review(event.dismissed_review.review_id) %}
    dismissed
    {% if dismissed_review %}
    <a class="d-inline-block">
      <img class="avatar avatar-user" height="20" width="20" src="{{ dismissed_review.user.avatar_url }}" />
    </a>
    <a class="author Link--primary text-bold">
      {{ dismissed_review.user.login|escape }}
    </a>
    's
    {% endif %}
    stale review
    {% if event.dismissed_review.dismissal_commit %}
    via {{ event.dismissed_review.dismissal_commit[:7] }}
    {% endif %}
    <a class="Link--secondary">{{ event.created_at|relative_time }}</a>
  </div>
</div>
{% endmacro %}
